<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">

<hibernate-mapping>
    <class name="cn.ffcs.organ.model.Person" table="T_ORGAN_PERSON">
        <id name="id" type="java.lang.Integer">
            <column name="id" />
            <generator  class="cn.ffcs.util.hibernate.generator.MyGenerator">
				<param name="table">T_COMM_SEQUENCE</param>
				<param name="column">NEXT_VAL</param>
				<param name="sequence_column">NAME</param>
				<param name="sequence_name">SEQ_ORGAN_PERSON</param>
			</generator>
        </id>
		<list name="linkMethods" table="T_ORGAN_LINKMETHOD" lazy="false" inverse="true">
         	<key column="person"></key>
         	<list-index column="id"/>
         	<one-to-many class="cn.ffcs.organ.model.LinkMethod"/>
       	</list>
        <property name="name" type="java.lang.String">
            <column name="name" length="256" not-null="true" />
        </property>
        <property name="lastName" type="java.lang.String">
            <column name="last_name" length="32" not-null="true" />
        </property>
        <property name="firstName" type="java.lang.String">
            <column name="first_name" length="32" not-null="true" />
        </property>
        <property name="sex" type="java.lang.String">
            <column name="sex" length="32" not-null="true" />
        </property>
        <property name="birthday" type="timestamp">
            <column name="birthday" length="32" not-null="true" />
        </property>
        <property name="creator" type="java.lang.String">
            <column name="creator" length="64" not-null="true" />
        </property>
        <property name="begin" type="timestamp">
            <column name="begin" length="64"/>
        </property>
        <property name="end" type="timestamp">
            <column name="end" length="64"/>
        </property>
        <property name="duty" type="java.lang.String">
            <column name="duty" length="32" />
        </property>
    </class>
</hibernate-mapping>
